[#assign base="${rc.getContextPath()}"]
[#macro dhtml title="Wenguo"]
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>${title}</title>
		<link href="${base}/resources/css/ui.css" rel="stylesheet" type="text/css"/>
		<script src="${base}/resources/js/jquery-1.4.3.min.js" type="text/javascript"></script>
		<script src="${base}/resources/js/main.js" type="text/javascript"></script>
		<script src="${base}/resources/js/ajax.js" type="text/javascript"></script>
	</head>
	<body>
		[#nested]
	</body>
</html>
[/#macro]

[#macro page p]
	[#if p??]
		[#assign url="${p.href}${p.hrefFormer}"]
		<div id="pagelink">
		Page ${p.pageNo} of ${p.totalPage} Page / pageSize: ${p.pageSize}
		[#if (p.pageNo > 1)]
			<a href="javascript:;" class="a_yes" dist="${url}1${p.hrefLatter}" sg="main">First</a> 
			<a href="javascript:;" class="a_yes" dist="${url}${p.pageNo - 1}${p.hrefLatter}" sg="main">Previous</a>
		[#else]
			<a href="javascript:;" disabled="disabled" class="a_no">First</a> 
			<a href="javascript:;" disabled="disabled" class="a_no">Previous</a>
		[/#if]
		[#if (p.pageNo > 0 && p.pageNo < p.totalPage)]
			<a href="javascript:;" class="a_yes" dist="${url}${p.pageNo + 1}${p.hrefLatter}" sg="main">Next</a> 
			<a href="javascript:;" class="a_yes" dist="${url}${p.totalPage}${p.hrefLatter}" sg="main">Last</a> 
		[#else]
			<a href="javascript:;" disabled="disabled" class="a_no">Next</a> 
			<a href="javascript:;" disabled="disabled" class="a_no">Last</a>
		[/#if]
		</div>
		<script>$(page);</script>
	[#else]
		No page
	[/#if]
[/#macro]

 